<?php  echo $header; ?>
<style>
.box2 > .heading {
	height: 38px;
	padding-left: 7px;
	padding-right: 7px;
	border: 1px solid #DBDBDB;
	background: url('../../image/box1.png') repeat-x;
	-webkit-border-radius: 7px 7px 0px 0px;
	-moz-border-radius: 7px 7px 0px 0px;
	-khtml-border-radius: 7px 7px 0px 0px;
	border-radius: 7px 7px 0px 0px;
}
.box2 > .heading h1 {
	margin: 0px;
	padding: 11px 0px 0px 0px;
	
	font-size: 16px;
	float: left;
}
select p.note {
    font-size: 11px;
}

input, textarea, select {
    background: none repeat scroll 0 0 #FFFFFF;
    border-color: #AAAAAA #C8C8C8 #C8C8C8 #AAAAAA;
    border-style: solid;
    border-width: 1px;
    font: 12px arial,helvetica,sans-serif;
	
}
select{
	vertical-align: middle;}
.inputbox select,.inputbox input{    
	width:300px;
	margin-left:50px;
}
.title h2 {
	height: 22px;
	border: 1px solid #578fb2;
	padding: 3px 0px 0px 10px;
	font-family:Arial, Helvetica, sans-serif;
	color: #fff;
	font-size: 13px;
	font-weight:bold;
	float: left;
	background-color:#4280a6;
	width:100%;
}
select {
   border: 1px solid #578fb2;
}

option {
   background-color: #cdecff;
   height:20px;
   font-family:Arial, Helvetica, sans-serif;
   font-size:12px;
   font-weight:normal;
   color:#333;
}
option selected{
   background-color: #045182;
   color:#fff;
}
.error2{
	 font-family:Arial, Helvetica, sans-serif;
	font-size:11px;
	font-weight:normal;
	
	height:20px;
	padding:3px 0px 0px 0px ;
	margin-left:50px;
}
p{
	font-family:Arial, Helvetica, sans-serif;
	font-size:12px;
	font-weight:normal;
	color:#333;
	height:20px;
	margin-left:50px;
	
}
</style>
<div id="content">
  <div class="breadcrumb">
    <?php foreach ($breadcrumbs as $breadcrumb) { ?>
    <?php echo $breadcrumb['separator']; ?><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a>
    <?php } ?>
  </div>
  <?php if ($error_warning) { ?>
  <div class="warning"><?php echo $error_warning; ?></div>
  <?php } ?>
   <div class="box">
    <div class="heading">
      <h1><?php echo $text_product; ?></h1>
    <div class="buttons">
         <!--a onclick="showPreview()" class="button"><span><?php echo $button_preview; ?></span></a-->
         <a onclick="$('#product_master').submit();" class="button"><span><?php echo $button_publish; ?></span></a>
         <a onclick="location = '<?php echo $cancel; ?>';" class="button"><span><?php echo $button_cancel; ?></span></a>
      </div>
    </div>
     <div class="box2">
    <div class="content">
      
<form action="<?php echo $action; ?>" name="product_master" id="product_master" method="post" enctype="multipart/form-data"> 
      <table class="form">
      <tbody>
        <tr>
          <td><table class="form">
            <tbody>
              <tr>
                <td colspan="2" class="title"><h2><span class="required">*</span><?php echo $entry_business_function;?></h2></td>
              </tr>
              <tr>
                <td valign="top" align="left" class="inputbox">		<select title="select a business function for the product" name="business_function" id="business_function">
				 
				    <?php if($business_function=="Sell" || $business_function=="" ){ ?>
				    <option value="Sell" selected="selected">Sell</option>
				    <?php }else{?>
		            <option value="Sell">Sell</option>
		            <?php } ?>
		            <?php if($business_function=="LeaseOut"){ ?>
					<option value="LeaseOut" selected="selected">Lease out</option>
					<?php }else{?>
					<option value="LeaseOut">Lease out</option>
					<?php } ?>
					<?php if($business_function=="Repair"){ ?>
					<option value="Repair" selected="selected">Repair</option>
					<?php }else{?>
					<option value="Repair">Repair</option>
					<?php } ?>
					<?php if($business_function=="Maintain"){ ?>
					<option value="Maintain" selected="selected">Maintain</option>
					<?php }else{?>
					<option value="Maintain">Maintain</option>
					<?php } ?>
					<?php if($business_function=="ConstructionInstallation"){ ?>
					<option value="ConstructionInstallation" selected="selected">Construction/Installation</option>
					<?php }else{?>
					<option value="ConstructionInstallation">Construction/Installation</option>
					<?php } ?>
					<?php if($business_function=="ProvideService"){ ?>
					<option value="ProvideService" selected="selected">Provide service</option>
					<?php }else{?>
					<option value="ProvideService">Provide service</option>
					<?php } ?>
					<?php if($business_function=="Dispose"){ ?>
					<option value="Dispose" selected="selected">Dispose</option>
					<?php }else{?>
					<option value="Dispose">Dispose</option>
					<?php } ?>
				</select> 
                  <?php if (isset($error_business_function)) { ?>
              <span class="error"><?php echo $error_business_function; ?></span>
              <?php } ?></td>
                <td>&nbsp;</td>
              </tr>
              <tr>
                <td colspan="2" class="title"><h2><?php echo $entry_payment_methods; ?> </h2>
					   <?php $payment_methods=explode(",",$payment_methods);  ?>
		             </td>
              </tr>
              <tr>
                <td class="inputbox"><select title="select multiple payment methods (control+click)" multiple="multiple"  size="8" name="payment_methods[]">
 
				            <?php if(in_array("ByBankTransferInAdvance", $payment_methods)){ ?>
							<option value="ByBankTransferInAdvance" selected="selected">Bank transfer in advance</option>
							<?php }else{ ?>
							<option value="ByBankTransferInAdvance">Bank transfer in advance</option>
							<?php } ?>
							<?php if(in_array("ByInvoice", $payment_methods)){ ?>
							<option value="ByInvoice" selected="selected">Invoice</option>
							<?php }else{ ?>
							<option value="ByInvoice">Invoice</option>
							<?php } ?>
							<?php if(in_array("Cash", $payment_methods)){ ?>
							<option value="Cash" selected="selected">Cash</option>
							<?php }else{ ?>
							<option value="Cash">Cash</option>
							<?php } ?>
							<?php if(in_array("CheckInAdvance", $payment_methods)){ ?>
							<option value="CheckInAdvance" selected="selected">Check in advance</option>
							<?php }else{ ?>
							<option value="CheckInAdvance">Check in advance</option>
							<?php } ?>
							<?php if(in_array("COD", $payment_methods)){ ?>
							<option value="COD" selected="selected">Cash on delivery</option>
							<?php }else{ ?>
							<option value="COD">Cash on delivery</option>
							<?php } ?>
							<?php if(in_array("DirectDebit", $payment_methods)){ ?>
							<option value="DirectDebit" selected="selected">Direct debit</option>
							<?php }else{ ?>
							<option value="DirectDebit">Direct debit</option>
							<?php } ?>
							<?php if(in_array("GoogleCheckOut", $payment_methods)){ ?>
							<option value="GoogleCheckOut" selected="selected">Google Checkout</option>
							<?php }else{ ?>
							<option value="GoogleCheckOut">Google Checkout</option>
							<?php } ?>
							<?php if(in_array("PayPal", $payment_methods)){ ?>
							<option value="PayPal" selected="selected">PayPal</option>
							<?php }else{ ?>
							<option value="PayPal">PayPal</option>
							<?php } ?>
							<?php if(in_array("PaySwarm", $payment_methods)){ ?>
							<option value="PaySwarm" selected="selected">PaySwarm</option>
							<?php }else{ ?>
							<option value="PaySwarm">PaySwarm</option>
							<?php } ?>
							<?php if(in_array("AmericanExpress", $payment_methods)){ ?>
							<option value="AmericanExpress" selected="selected">American Express</option>
							<?php }else{ ?>
							<option value="AmericanExpress" >American Express</option>
							<?php } ?>
							<?php if(in_array("DinersClub", $payment_methods)){ ?>
							<option value="DinersClub" selected="selected">DinersClub</option>
							<?php }else{ ?>
							<option value="DinersClub">DinersClub</option>
							<?php } ?>
							<?php if(in_array("Discover", $payment_methods)){ ?>
							<option value="Discover" selected="selected">Discover</option>
							<?php }else{ ?>
							<option value="Discover">Discover</option>
							<?php } ?>
							<?php if(in_array("JCB", $payment_methods)){ ?>
							<option value="JCB" selected="selected">JCB</option>
							<?php }else{ ?>
							<option value="JCB">JCB</option>
							<?php } ?>
							<?php if(in_array("MasterCard", $payment_methods)){ ?>
							<option value="MasterCard" selected="selected">MasterCard</option>
							<?php }else{ ?>
							<option value="MasterCard">MasterCard</option>
							<?php } ?>
							<?php if(in_array("VISA", $payment_methods)){ ?>
							<option value="VISA" selected="selected">VISA</option>
							<?php }else{ ?>
							<option value="VISA">VISA</option>
							<?php } ?> 			
              </select> 
                  <div class="error2"><?php echo $text_select_all;?></div> </td>
                <td>&nbsp;</td>
              </tr>
              <tr>
                <td colspan="2" class="title"><h2><?php echo $entry_delivery_methods;?></h2>
                <?php $delivery_methods=explode(",",$delivery_methods); ?></td>
              </tr>
              <tr>
                <td class="inputbox"><select title="select applicable delivery modes (control+click)" multiple="multiple"  size="8" name="delivery_methods[]">
							<?php if(in_array("DeliveryModeDirectDownload", $delivery_methods)){ ?>
							<option value="DeliveryModeDirectDownload" selected="selected">Direct download</option>
							<?php }else{ ?>
							<option value="DeliveryModeDirectDownload">Direct download</option>
							<?php } ?>
							<?php if(in_array("DeliveryModeFreight", $delivery_methods)){ ?>
							<option value="DeliveryModeFreight" selected="selected">Freight</option>
							<?php }else{ ?>
							<option value="DeliveryModeFreight">Freight</option>
							<?php } ?> 	
							<?php if(in_array("DeliveryModeMail", $delivery_methods)){ ?>
							<option value="DeliveryModeMail" selected="selected">Mail</option>
							<?php }else{ ?>
							<option value="DeliveryModeMail">Mail</option>
							<?php } ?>
							<?php if(in_array("DeliveryModeOwnFleet", $delivery_methods)){ ?>
							<option value="DeliveryModeOwnFleet" selected="selected">Own fleet</option>
							<?php }else{ ?>
							<option value="DeliveryModeOwnFleet">Own fleet</option>
							<?php } ?> 
							<?php if(in_array("DeliveryModePickUp", $delivery_methods)){ ?>
							<option value="DeliveryModePickUp" selected="selected">Pick up</option>
							<?php }else{ ?>
							<option value="DeliveryModePickUp">Pick up</option>
							<?php } ?>		 
							<?php if(in_array("DHL", $delivery_methods)){ ?>
							<option value="DHL" selected="selected">DHL</option>
							<?php }else{ ?>
							<option value="DHL">DHL</option>
							<?php } ?>     
							<?php if(in_array("FederalExpress", $delivery_methods)){ ?>
							<option value="FederalExpress" selected="selected">Federal Express</option>
							<?php }else{ ?>
							<option value="FederalExpress">Federal Express</option>
							<?php } ?>  
							<?php if(in_array("UPS", $delivery_methods)){ ?>
							<option value="UPS" selected="selected">UPS</option>
							<?php }else{ ?>
							<option value="UPS">UPS</option>
							<?php } ?> 
				</select>
                 <div class="error2"> <?php echo $text_select_all;?> </div></td>
               <td>&nbsp;</td></tr>
              <tr>
                <td colspan="2" class="title"><h2><?php echo $entry_status; ?></h2></td>
                 
              </tr>
              <tr>
               
                <td class="inputbox"><select name="status">
                  <?php if ($status =='1') { ?>
                  <option value="1" selected="selected"><?php echo $text_enabled; ?></option>
                  <option value="0"><?php echo $text_disabled; ?></option>
                  <?php } elseif ($status =='0')  { ?>
                  <option value="1"  ><?php echo $text_enabled; ?></option>
                  <option value="0" selected="selected"><?php echo $text_disabled; ?></option>
                  <?php } else {?>
                    <option value="1" selected="selected" ><?php echo $text_enabled; ?></option>
                  <option value="0" ><?php echo $text_disabled; ?></option>
                  <?php } ?>
                </select> 
                  <div class="error2"><?php echo $text_status;?></div></td>
                  <td>&nbsp;</td>
              </tr>
             
              <tr>
                <td colspan="2"><p><?php echo $text_note; ?></p></td>
              </tr>
              <tr>
                <td colspan="2"><p><?php echo $product_gr_richsnippet; ?></p></td>
              </tr>
            </tbody>
          </table></td>
        </tr>
      </tbody></table>
    </form>
</div>
</div>
</div>
<?php echo $footer; ?>